using Microsoft.AspNetCore.Http;
using SX.BaseService.Service.Implement.SysUser.ViewModel;
using SX.Core;
using System;
using System.Collections.Generic;
using System.Data;
using System.Text;
using System.Threading.Tasks;

namespace SX.BaseService.Service
{
    /// <summary>
	/// SysUser服务接口
	/// </summary>
    public interface ISysUserService
    {
        /// <summary>
        /// 查询
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IApiResult> Query(UserQueryModel model);

        /// <summary>
        /// 查询指定账户权限列表
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<List<string>> QueryPermissionList(string userId);


        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IApiResult> Add(UserAddModel model);

        /// <summary>
        /// 查询账户
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IApiResult> Get(string userId);
        /// <summary>
        /// 删除
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<IApiResult> Delete(List<string> ids);
        /// <summary>
        /// 更新
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IApiResult> Update(UserUpdateModel model);

        /// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="oldpwd"></param>
        /// <param name="newpwd"></param>
        /// <returns></returns>
        Task<IApiResult> EditPwd(string oldpwd, string newpwd);

        /// <summary>
        /// 修改基本信息
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        Task<IApiResult> UpdateBasic(UpdateModel_Basic model);

        /// <summary>
        /// 得到所有用户信息的datatable
        /// </summary>
        /// <returns></returns>
        Task<DataTable> QueryUserDTable();

        /// <summary>
        /// Excel导入
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        Task<IApiResult> ImportData(IFormFile file);
    }
}